{// 引入标签库 }
<tagLib name="html" />
<include file="Public:header" />
<PHP>
	function get_handle($id)
	{
		
        $str = l("IPS_VIEW");
        
		$str = "<a href='".u("IpsRelation/deal_view",array("id"=>$id))."'>".$str."</a>";
		return $str;
	}
    function get_relation_status($id)
    {
    	return l("P_RELATION_STATUS_".$id);
    }
    function get_repay_status($id)
    {
    	if($id)
    		return l("REPAY_STATUS_".$id);
    }
    function get_has_repay($id)
    {
    	if($id)
    		return l("HAS_REPAY_".$id);
    }
	function get_deal_name($deal_id)
    {
    	if($deal_id)
    		return M("deal")->where(" id=".$deal_id)->getField("name");
    }
	
</php>
<load href='__TMPL__Common/js/jquery.bgiframe.js' />
<load href='__TMPL__Common/js/jquery.weebox.js' />
<load href='__TMPL__Common/style/weebox.css' />
<script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.php?lang=zh-cn" ></script>
<load href='__TMPL__Common/js/calendar/calendar.css' />
<load href='__TMPL__Common/js/calendar/calendar.js' />
<div class="main">
<div class="main_title">{%IPS_REPAYMENT_RELATION_TITLE}
	<a href="{:u("IpsRelation/repayment")}" class="back_list">{%BACK_LIST}</a>
</div>
<div class="blank5"></div>
<form name="search" action="__APP__" method="get">	
<div class="button_row">
	
	<if condition="!$_REQUEST['referer']">
	<input type="button" class="button" value="{%EXPORT}" onclick="m_export_csv('deal_');" />
	</if>
</div>
<div class="blank5"></div>
<div class="search_row">

		{%P_CRE_MER_BILL_NO}：<input type="text" class="textbox" name="pCreMerBillNo" value="{:trim($_REQUEST['pCreMerBillNo'])}" style="width:100px;" />
        
        {%P_RELATION_STATUS}：<select name="pStatus">
				<option value="-1" <if condition="intval($_REQUEST['pStatus']) eq -1 || $_REQUEST['pStatus'] eq ''">selected="selected"</if>>{%ALL}</option>
				<option value="Y" <if condition="$_REQUEST['pStatus'] eq 'Y'">selected="selected"</if>>{%P_RELATION_STATUS_Y}</option>
				<option value="N" <if condition="$_REQUEST['pStatus'] eq 'N'">selected="selected"</if>>{%P_RELATION_STATUS_N}</option>		
		</select>
        
        
		{%P_IN_ACCT_NO}：<input type="text" class="textbox" name="pInAcctNo" value="{:trim($_REQUEST['pInAcctNo'])}" style="width:100px;" />

		<input type="hidden" value="IpsRelation" name="m" />
		<input type="hidden" value="deal_list" name="a" />
        <input type="hidden" value="{$id}" name="id" />
		<input type="submit" class="button" value="{%SEARCH}" />

</div>
</form>
<div class="blank5"></div>
<html:list 
	id="dataTable" 
	style="dataTable" 
	name="repayment"  
	action="true" 
    pk = "mid"
	datasource="list" 
	show="mid:{%ID}
    	 ,pCreMerBillNo:{%P_CRE_MER_BILL_NO}|100px
         ,pInAcctNo:{%P_IN_ACCT_NO}
         ,pInFee:{%P_IN_FEE}
         ,pOutInfoFee:{%P_OUT_INFO_FEE}
         ,pInAmt:{%P_IN_AMT}
		 ,pStatus|get_relation_status:{%P_RELATION_STATUS}
		 ,pMessage:{%P_MESSAGE}
		 ,impose_money:{%IMPOSE_MONEY}
		 ,deal_id|get_deal_name:{%DEAL_name}
         ,self_money:{%SELF_MONEY}
         ,repay_money:{%REPAY_MONEY}
         ,manage_money:{%MANAGE_MONEY}
         ,repay_time|to_date:{%RELATION_REPAY_TIME}
         ,true_repay_time|to_date:{%TRUE_REPAY_TIME}
         ,status|get_repay_status:{%REPAY_STATUS}
         ,is_site_repay:{%IS_SITE_REPAY}
         ,has_repay|get_has_repay:{%HAS_REPAY}
         ,user_name:{%RELATION_USER_NAME}
         ,t_user_name:{%RELATION_T_USER_NAME}
         "         
	actionlist="mid|get_handle" /> 

<div class="blank5"></div>
<div class="page">{$page}</div>
</div>
<include file="Public:footer" />